/**
 *    Copyright (C) 2008, 2009  Victor Smirnov <aist11@gmail.com>
 *
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License along
 *    with this program; if not, write to the Free Software Foundation, Inc.,
 *    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 *    See LICENSE.exceptions in the root folder of this project for possible
 *    exceptions
 *
 */

#ifndef _CUBEFS_CORE_BTREE_NAMES_HPP
#define	_CUBEFS_CORE_BTREE_NAMES_HPP

#include <cubefs/core/container/tools.hpp>

namespace cubefs    {
namespace btree     {

using cubefs::ctr::Default;


template <typename ModelTypes>
struct BTree {
    typedef ModelTypes                                                          Types;
};

struct MapTypes {
    enum {Value = VALUE_MAP, Index = INDEX_MAP};
};

class IDType {};

template <typename ModelName, typename BasePagesPartsList>
class NodeBaseFactory               {};

template <typename ModelTypeName>
class BTreeCountersFactory          {};

template <typename ModelTypeName>
class BTreeRootMetadataFactory      {
    typedef ModelTypeName ModelName;
};

template <typename ModelName>
class ModelPartsListFactory         {};

template <typename ModelName>
class IteratorPartsListFactory      {};



template <typename ModelName>
class BasePagePartsListFactory      {};

template <typename ModelName>
class RootPagePartsListFactory      {};

template <typename ModelName>
class LeafPagePartsListFactory      {};

template <typename ModelName>
class InternalPagePartsListFactory  {};


class InitName              {};
class ToolsName             {};
class FindName              {};
class InsertName            {};
class RemoveName            {};
class MapApiName            {};
class ChecksName            {};
class StubsName             {};


template <typename MyType, typename TypesType, typename ModelTypeName>
class BTreeIteratorBaseFactoryName  {};

template <typename ModelType, typename ModelTypeName>
class BTreeIteratorFactoryName      {};

class IteratorToolsName     {};
class IteratorWalkName      {};
class IteratorAPIName       {};
class IteratorModelAPIName  {};

template <typename ModelTypeName>
class RootNodeMetadataName  {
    typedef ModelTypeName ModelName;
};

template <
    typename BasePagePartsListType,
    typename RootPagePartsListType,
    typename InternalPagePartsListType,
    typename LeafPagePartsListType
>
struct Lists {
    typedef BasePagePartsListType                                               BasePagePartsList;
    typedef RootPagePartsListType                                               RootPagePartsList;
    typedef InternalPagePartsListType                                           InternalPagePartsList;
    typedef LeafPagePartsListType                                               LeafPagePartsList;
};


template <typename Name>
struct ValueTypeIsNotSupported;


}
}


#endif	// _CUBEFS_CORE_BTREE_NAMES_HPP

